import VueRouter from "vue-router";
import Gay from "../pages/Gay";
import Vue from "vue";
Vue.use(VueRouter);
const routes = [
  {
    path: "/gay",
    // component: Gay,
    components: {
      // test:My,
      default: Gay,
    },
  },
  {
    path: "/my",
    component: () => import(/*webpackChunkName:"my"*/ "../pages/My"),
  },
  {
    path: "/goods",
    component: () => import(/*webpackChunkName:"goods"*/ "../pages/Goods"),
  },
  {
    path: "/discover",
    redirect: "/discover/djradio",
    component: () =>
      import(/*webpackChunkName:"discover"*/ "../pages/Discover"),
    children: [
      {
        name: "playlist",
        path: "playlist",
        component: () =>
          import(/*webpackChunkName:"playlist"*/ "../pages/Discover/Playlist"),
      },
      {
        path: "toplist",
        component: () =>
          import(/*webpackChunkName:"toplist"*/ "../pages/Discover/Toplist"),
      },
      {
        path: "djradio",
        component: () =>
          import(/*webpackChunkName:"djradio"*/ "../pages/Discover/Djradio"),
      },
    ],
  },
  {
    path: "/detail/:id",
    props: true,
    component: () => import(/*webpackChunkName:"detail"*/ "../pages/Detail"),
  },
  {
    path: "/count",
    component: () => import(/*webpackChunkName:"count"*/ "../pages/Count"),
  },
  {
    path: "*",
    component: () => import(/*webpackchunkName:404*/ "../pages/page404"),
  },
  {
    path: "/cart",
    component: () => import(/*webpackchunkName:"cart"*/ "~/Cart"),
  },
  // {
  //   path: "/login",
  //   component: () => import(/*webpackchunkName:"login"*/ "~/Login"),
  // },
  {
    path: "/comment",
    component: () => import(/*webpackchunkName:"comment"*/ "pages/Comment"),
  },
];
export default new VueRouter({
  routes,
});
